package com.jzm.service.impl;

import com.jzm.annotation.AutoWried;
import com.jzm.dao.UserDAO;
import com.jzm.dto.UserQueryDTO;
import com.jzm.entity.User;
import com.jzm.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
    @AutoWried
    private UserDAO userDAO;

    @Override
    public User createUser(User user) throws Exception{

        User returnUser = this.userDAO.createUser(user);

        return returnUser;
    }

    @Override
    public User updateUser(User user) {
        return this.userDAO.updateUser(user);
    }

    @Override
    public List<User> selectUserInfo(UserQueryDTO userQueryDTO) {
        return this.userDAO.selectUserInfo(userQueryDTO);
    }
}
